home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gf19lc5 / gemfast.h < prev    next >
C/C++ Source or Header  |  1995-04-27  |  29KB  |  599 lines

  1. /*****************************************************************************
  2.  * GEMFAST.H - Header for the high-level functions in the GemFast library.
  3.  *
  4.  * Maintenance:
  5.  *  02/01/93   v1.9
  6.  *             > Created by splitting old gemfast.h into this plus gemfbind.h.
  7.  *             > Changed to __PROTO() style prototypes.
  8.  *             > Added conditional block for GNU compiler.
  9.  *             > Added NO_GEMFAST_HLL conditional block stuff.
  10.  ****************************************************************************/
  11.  
  12. #ifndef GEMFAST_H
  13. #define GEMFAST_H
  14.  
  15. #include <stdarg.h>     /* need this for va_list type */
  16.  
  17. /*****************************************************************************
  18.  * first include the right set of binding headers, and set up some macros
  19.  * to provide independance from the variations between different bindings.
  20.  ****************************************************************************/
  21.  
  22. #ifdef __cplusplus
  23.   extern "C" {
  24. #endif
  25.  
  26. #if defined(__STDC__) && defined(M68000) && defined(GEMDOS)
  27.   #if !defined(__GNUC__) && !defined(LATTICE)
  28.     #define MWC
  29.   #endif
  30. #endif
  31.  
  32. /*----------------------------------------------------------------------------
  33.  * Lattice C v5.x
  34.  *--------------------------------------------------------------------------*/
  35.  
  36. #if defined(LATTICE)
  37.  
  38.   #define GEMFAST_PROTOS
  39.  
  40.   #include <aes.h>
  41.   #include <vdi.h>
  42.  
  43.   #define _Ob_spec      ob_spec
  44.   #define _Ob_spec_t    void*
  45.  
  46.   #define GSTACKARGS    __stdargs
  47.   #define GREGARGS      __regargs
  48.   #define GFAR          far
  49.   #define GNEAR         near
  50.   #ifdef _BASEREL
  51.     #define GLOADDS     __saveds
  52.   #else
  53.     #define GLOADDS
  54.   #endif
  55.  
  56.   /* remap our standard global var names to LC's names */
  57.  
  58.   #define gl_apversion  ( (short)_AESglobal[0] )
  59.   #define gl_apcount    ( (short)_AESglobal[1] )
  60.   #define gl_apid       ( (short)_AESglobal[2] )
  61.   #define gl_apprivate  ( *(long *)(&_AESglobal[3]) )
  62.   #define gl_apptree    ( *(void **)(&_AESglobal[5]) )
  63.   #define gl_ap1resv    ( *(long *)(&_AESglobal[7]) )
  64.   #define gl_aprshdr    ( *(void **)(&_AESglobal[9]) )
  65.  
  66.   /* set up some names defined in gemfbind.h but not LC's aes.h */
  67.  
  68.   #define IS_HOLLOW     0
  69.   #define IS_SOLID      1
  70.   #define IS_PATTERN    2
  71.   #define IS_HATCH      3
  72.   #define IS_UDPTRN     4
  73.  
  74.   #define IP_HOLLOW     0
  75.   #define IP_SOLID      7
  76.  
  77.   #define TE_SYSTEM     3
  78.   #define TE_SMALL      5
  79.  
  80. /*----------------------------------------------------------------------------
  81.  * GNU C 2.x using GemFast as the low-level bindings
  82.  *--------------------------------------------------------------------------*/
  83.  
  84. #elif defined(__GNUC__)
  85.  
  86.   #define GEMFAST_PROTOS
  87.  
  88.   #include <gemfbind.h>
  89.  
  90.   #define _Ob_spec      ob_spec
  91.   #define _Ob_spec_t    long
  92.  
  93.   #define GSTACKARGS
  94.   #define GREGARGS
  95.   #define GFAR
  96.   #define GNEAR
  97.   #define GLOADDS
  98.  
  99. /*----------------------------------------------------------------------------
  100.  * Turbo C (I'm not sure about all these being right; they would be on msdos)
  101.  *--------------------------------------------------------------------------*/
  102.  
  103. #elif defined(__TURBOC__)
  104.  
  105.   #define GEMFAST_PROTOS
  106.  
  107.   #include <gem.h>
  108.  
  109.   #define _Ob_spec      ob_spec.string
  110.   #define _Ob_spec_t    char*
  111.  
  112.   #define GSTACKARGS    cdecl
  113.   #define GREGARGS
  114.   #define GFAR          __far
  115.   #define GNEAR         __near
  116.   #define GLOADDS       __loadds
  117.  
  118. /*----------------------------------------------------------------------------
  119.  * Sozobon, HSC v1.x and 2.x
  120.  *--------------------------------------------------------------------------*/
  121.  
  122. #elif defined(SOZOBON) || defined(__HSC__) || defined(MWC)
  123.  
  124.   #undef GEMFAST_PROTOS         /* non-ansi compilers here! */
  125.  
  126.   #include <gemfbind.h>
  127.  
  128.   #define _Ob_spec   ob_spec
  129.   #define _Ob_spec_t long
  130.  
  131.   #define GSTACKARGS
  132.   #define GREGARGS
  133.   #define GFAR
  134.   #define GNEAR
  135.   #define GLOADDS
  136.  
  137. /*----------------------------------------------------------------------------
  138.  * catch-all for unknown compilers
  139.  *--------------------------------------------------------------------------*/
  140.  
  141. #else
  142.  
  143.   #error Unknown compiler in GEMFAST.H!
  144.  
  145. #endif
  146.  
  147. /*****************************************************************************
  148.  * all high-level library stuff will be omitted if NO_GEMFAST_HLL is
  149.  * defined.  defining it effectively gives you vanilla DRI-standard GEM
  150.  * bindings with no extensions in terms of functions, datatypes, macros,
  151.  * constants, or anything else.
  152.  ****************************************************************************/
  153.  
  154. #ifndef NO_GEMFAST_HLL
  155.  
  156. /*****************************************************************************
  157.  * macros used in declarations and prototypes.
  158.  *  GCALLBACK is a set of function modifiers used when the AES or GemFast
  159.  *  internals call back into client code.  For some compilers' memory
  160.  *  models, it's necessary to specify stacked args & auto-load data base reg.
  161.  ****************************************************************************/
  162.  
  163. #define GCALLBACK       GFAR GSTACKARGS GLOADDS
  164.  
  165. #ifndef __PROTO
  166.   #ifdef GEMFAST_PROTOS
  167.     #define __PROTO(a) a
  168.   #else
  169.     #define __PROTO(a) ()
  170.   #endif
  171. #endif
  172.  
  173. #ifdef LATTICE          /* Lattice C bug workaround:  __saveds in a proto   */
  174.   #define __saveds      /* causes spurious arg type mismatches; define it   */
  175. #endif                  /* away until the end of this header file.          */
  176.  
  177. /*****************************************************************************
  178.  * some handy function-like macros for GRECT and VRECT parm passing.
  179.  ****************************************************************************/
  180.  
  181. #define RECTVALS(r)  (r)->g_x,    (r)->g_y,    (r)->g_w,    (r)->g_h
  182. #define RECTPTRS(r)  &((r)->g_x), &((r)->g_y), &((r)->g_w), &((r)->g_h)
  183. #define RECTARRAY(r) ((short *)(r))
  184.  
  185. /*****************************************************************************
  186.  * GemFast-defined constants.
  187.  ****************************************************************************/
  188.  
  189. /*----------------------------------------------------------------------------
  190.  * Tell the world we're here.
  191.  *--------------------------------------------------------------------------*/
  192.  
  193. #define GEMF_VERSION    0x0190  /* Tell the world we are v1.90             */
  194.  
  195. /*----------------------------------------------------------------------------
  196.  * miscellanious stuff.
  197.  *--------------------------------------------------------------------------*/
  198.  
  199. #define NO_OBJECT        (-1)   /* object (in tree) not found               */
  200.  
  201. #define GRF_MSALTARROW    200   /* alternate value of ARROW for grf_mouse() */
  202. #define GRF_MSINQUIRE    (-1)   /* inquire current shape for grf_mouse()    */
  203. #define OBJ_BMINQUIRE    (-1)   /* get w/o change from obj_bmbuttons()      */
  204. #define FRM_GETDEFAULTS (-1L)   /* get w/o change from frm_defaults()       */
  205. #define FRM_MOVER      0x4000   /* special ob_flags value for moveable forms*/
  206.  
  207. #define G_THERMO          200   /* ob_type for a thermometer display object */
  208. #define G_TSCROLL         201   /* ob_type for a text scroll object         */
  209. #define G_RSTRING         202   /* ob_type for a replace-string object      */
  210. #define G_NSLIDE          203   /* ob_type for a numeric-slider object      */
  211.  
  212. #define OBJ_NODRAW          0   /* obj_XXchange(): no draw after change     */
  213. #define OBJ_WITHDRAW        1   /* obj_XXchange(): draw after change        */
  214. #define OBJ_CLIPDRAW        2   /* obj_XXchange(): draw with optional clip  */
  215.  
  216. #define OBJ_TINQUIRE  (-32000)  /* inquire current G_THERMO position        */
  217. #define OBJ_TINCREMENT    (-1)  /* increment current G_THERMO position by 1 */
  218.  
  219. #define FRM_DSMAXBUTTONS    5   /* max dynamic button strings               */
  220. #define FRM_DSMAXSTRINGS   20   /* max dynamic dialog display strings       */
  221.  
  222. #define EVN_BUTTONUP        0   /* evn_wbutton(): wait for button-up        */
  223. #define EVN_BUTTONDOWN      1   /* evn_wbutton(): wait for button-down      */
  224.  
  225. /*----------------------------------------------------------------------------
  226.  * options for apl_whatever() functions.
  227.  *--------------------------------------------------------------------------*/
  228.  
  229. #define APL_RTRANSIENT      0x0001  /* cleanup transient resources */
  230. #define APL_RPERMANENT      0x0002  /* cleanup permenant resources */
  231.  
  232. /*----------------------------------------------------------------------------
  233.  * actions for frm_desktop().
  234.  *--------------------------------------------------------------------------*/
  235.  
  236. #define FRM_DTINSTALL   0x00000000L  /* install form as system desktop      */
  237. #define FRM_DTREMOVE    0x10000000L  /* remove form, revert to sys desktop  */
  238.  
  239. /*----------------------------------------------------------------------------
  240.  * actions for frm_dialog().
  241.  *--------------------------------------------------------------------------*/
  242.  
  243. #define FRM_DSTART      0x10000000L  /* do FMD_START                        */
  244. #define FRM_DDRAW       0x20000000L  /* do objc_draw()                      */
  245. #define FRM_DDO         0x40000000L  /* do form_do()                        */
  246. #define FRM_DFINISH     0x80000000L  /* do FMD_FINISH                       */
  247. #define FRM_DCOMPLETE   0xF0000000L  /* do all the steps above in one call  */
  248.  
  249. /*----------------------------------------------------------------------------
  250.  * actions for frm_progress().
  251.  *--------------------------------------------------------------------------*/
  252.  
  253. #define FRM_PSTART      0x10000000L  /* set up and display progress dialog  */
  254. #define FRM_PUPDATE     0x40000000L  /* update progress thermometer         */
  255. #define FRM_PFINISH     0x80000000L  /* close and cleanup progress dialog   */
  256.  
  257. /*----------------------------------------------------------------------------
  258.  * options for all frm_whatever() functions.
  259.  *   0xauddbbbb
  260.  *     ||| |______ Basic options for all dialog handling.
  261.  *     |||________ Dynamic dialog options.
  262.  *     ||_________ User options; never touched by GemFast.
  263.  *     |__________ Actions.
  264.  *--------------------------------------------------------------------------*/
  265.  
  266. #define FRM_NORMAL          0x00000000L /* placeholder when you want none   */
  267. #define FRM_EXPLODE         0x00000001L /* exploding box graphics in dialog */
  268. #define FRM_CENTER          0x00000002L /* center dialog in screen          */
  269. #define FRM_NEARMOUSE       0x00000004L /* center dialog over mouse         */
  270. #define FRM_MOUSEARROW      0x00000008L /* force mouse ARROW during dialog  */
  271. #define FRM_USEBLIT         0x00000010L /* use blits instead of redraw msgs */
  272. #define FRM_MOVEABLE        0x00000020L /* dialog is moveable               */
  273. #define FRM_NODEFAULTS      0x00008000L /* these options override defaults  */
  274.  
  275. #define FRM_DMUSTSELECT     0x00010000L /* dsdialog/dsmenu: no default exit */
  276. #define FRM_DSHADOWED       0x00020000L /* dsdialog/dsmenu: shadowed parent */
  277. #define FRM_DEFAULTLEFT     0x00040000L /* dsdialog/dsmenu: dflt btn on left*/
  278.  
  279. #define FRM_DSL1TITLE       0x00100000L /* 1st line is title, higher y pos  */
  280.  
  281. #define FRM_MEXITPARENT     0x00100000L /* exit if mouse leaves parent      */
  282. #define FRM_MEXITVICINITY   0x00200000L /* exit if mouse leaves vicinity    */
  283.  
  284. #define FRM_OPTIONBITS      0x0FFFFFFFL /* mask for dialog options          */
  285. #define FRM_BOPTIONBITS     0x0000FFFFL /* mask for basic options           */
  286. #define FRM_DOPTIONBITS     0x00FF0000L /* mask for dynamic options         */
  287. #define FRM_UOPTIONBITS     0x0F000000L /* mask for user options            */
  288. #define FRM_ACTIONBITS      0xF0000000L /* mask for dialog actions          */
  289.  
  290. /*----------------------------------------------------------------------------
  291.  * option for fsl_dialog().
  292.  *--------------------------------------------------------------------------*/
  293.  
  294. #define FSL_NORMAL          0x0000
  295. #define FSL_FNOPTIONAL      0x0001
  296. #define FSL_PATHONLY        0x0002
  297.  
  298. /*----------------------------------------------------------------------------
  299.  * options for grf_blit() and grf_memblit().
  300.  *--------------------------------------------------------------------------*/
  301.  
  302. #define GRF_NORMAL         0x0000  /* a placeholder value                */
  303. #define GRF_BFROMSCREEN    0x1000  /* blit from screen to buffer         */
  304. #define GRF_BTOSCREEN      0x2000  /* blit from buffer to screen         */
  305. #define GRF_BMEMCALC       0x4000  /* calc mem requirements, don't blit  */
  306. #define GRF_BOBJTREE       0x0001  /* rectparm OBJECT* instead of GRECT* */
  307.  
  308. /*****************************************************************************
  309.  * GemFast-defined data structures.
  310.  ****************************************************************************/
  311.  
  312. /*----------------------------------------------------------------------------
  313.  * VRECT structure.
  314.  *--------------------------------------------------------------------------*/
  315.  
  316. typedef struct vrect {
  317.     short v_x1, v_y1, v_x2, v_y2;
  318. } VRECT;
  319.  
  320. /*----------------------------------------------------------------------------
  321.  * XMOUSE structure.
  322.  *--------------------------------------------------------------------------*/
  323.  
  324. typedef struct xmouse {
  325.     short retval;
  326.     short bclicks;
  327.     short mask;
  328.     short state;
  329.     short status;
  330.     short mousex;
  331.     short mousey;
  332.     short mouseb;
  333.     short keystate;
  334. } XMOUSE;
  335.  
  336. /*----------------------------------------------------------------------------
  337.  * XMULTI structure.
  338.  *--------------------------------------------------------------------------*/
  339.  
  340. typedef struct xmulti {
  341.     short   msgbuf[8];
  342.     short   mflags;
  343.     short   mbclicks;
  344.     short   mbmask;
  345.     short   mbstate;
  346.     short   mm1flags;
  347.     GRECT   mm1rect;
  348.     short   mm2flags;
  349.     GRECT   mm2rect;
  350.     long    mtcount;
  351.     short   mwhich;
  352.     short   mmox;
  353.     short   mmoy;
  354.     short   mmobutton;
  355.     short   mmokstate;
  356.     short   mkreturn;
  357.     short   mbreturn;
  358. } XMULTI;
  359.  
  360. /*----------------------------------------------------------------------------
  361.  * GUDSLIDE_FUNC, the type of a callback function for grf_udslidebox.
  362.  *--------------------------------------------------------------------------*/
  363.  
  364. typedef void GCALLBACK (GUDSLIDE_FUNC) __PROTO((OBJECT *ptree, short obj, short slidepos, void *udata));
  365.  
  366. /*----------------------------------------------------------------------------
  367.  * XUSERBLK and related items.
  368.  *--------------------------------------------------------------------------*/
  369.  
  370.  
  371. struct xparm_blk;           /* tentative decl of these forward-referenced  */
  372. struct xuser_blk;           /* structures keeps facist compilers happy.    */
  373.  
  374. typedef struct xparm_blk XPARMBLK;
  375. typedef struct xuser_blk XUSERBLK;
  376.  
  377. typedef enum xuser_touch_status {   /* status returned by xuser_blk.ub_touch() */
  378.     XUBT_NONE   = 0x0000,   /* nothing happened as result of touch             */
  379.     XUBT_VISUAL = 0x0001,   /* touch caused minor visual change in object      */
  380.     XUBT_VALUE  = 0x0002,   /* touch caused important change in obj's value(s) */
  381.     XUBT_DCEXIT = 0x0004    /* touch was d-click, treat as default exit object */
  382. } XUBT_STATUS;
  383.  
  384. typedef long        GCALLBACK (XUB_DRAWFUNC)  __PROTO((XPARMBLK *xpb));
  385. typedef XUBT_STATUS GCALLBACK (XUB_TOUCHFUNC) __PROTO((XUSERBLK *xub, short mx, short my, short clicks));
  386.  
  387. struct xuser_blk {
  388.     XUB_DRAWFUNC     *ub_draw;     /* the 1st two fields are USERBLK std, */
  389.     struct xuser_blk *ub_self;     /* but ub_parm always points to self.  */
  390.     XUB_TOUCHFUNC    *ub_touch;    /* call this func when object touched. */
  391.     long              ub_size;     /* size of this XUSERBLK structure.    */
  392.     _Ob_spec_t        ob_spec;     /* ob_spec and ob_type are from the    */
  393.     short             ob_type;     /* original object before we xformed   */
  394.     OBJECT           *parent_tree; /* it.  parent_tree and parent_obj are */
  395.     short             parent_obj;  /* a backlink to the original object.  */
  396.     long              reserved[4]; /* room to grow.                       */
  397. };
  398.  
  399. /*----------------------------------------------------------------------------
  400.  * XPARMBLK structure (our remapping of a standard PARMBLK).
  401.  *--------------------------------------------------------------------------*/
  402.  
  403. struct xparm_blk {
  404.     OBJECT   *ptree;
  405.     short    obj;
  406.     short    prevstate;
  407.     short    currstate;
  408.     GRECT    drawrect;
  409.     GRECT    cliprect;
  410.     XUSERBLK *pub;
  411. };
  412.  
  413. /*****************************************************************************
  414.  * declarations of all global vars defined by gemfast.
  415.  ****************************************************************************/
  416.  
  417. /*
  418.  * these are valid after apl_xinit()
  419.  */
  420.  
  421. extern unsigned short    gl_grfhandle;  /* physical VDI handle (graf_handle)*/
  422. extern unsigned short    gl_wchar;      /* width of a character             */
  423. extern unsigned short    gl_w2char;     /* width of a character  / 2        */
  424. extern unsigned short    gl_w4char;     /* width of a character  / 4        */
  425. extern unsigned short    gl_w8char;     /* width of a character  / 8        */
  426. extern unsigned short    gl_hchar;      /* height of a character            */
  427. extern unsigned short    gl_h2char;     /* height of a character / 2        */
  428. extern unsigned short    gl_h4char;     /* height of a character / 4        */
  429. extern unsigned short    gl_h8char;     /* height of a character / 8        */
  430. extern unsigned short    gl_wbox;       /* width of a boxchar               */
  431. extern unsigned short    gl_w2box;      /* width of a boxchar    / 2        */
  432. extern unsigned short    gl_w4box;      /* width of a boxchar    / 4        */
  433. extern unsigned short    gl_w8box;      /* width of a boxchar    / 8        */
  434. extern unsigned short    gl_hbox;       /* height of a boxchar              */
  435. extern unsigned short    gl_h2box;      /* height of a boxchar   / 2        */
  436. extern unsigned short    gl_h4box;      /* height of a boxchar   / 4        */
  437. extern unsigned short    gl_h8box;      /* height of a boxchar   / 8        */
  438.  
  439. extern GRECT    gl_rwdesk;      /* coordinates of work area of the desktop  */
  440. extern GRECT    gl_rfscrn;      /* coordinates of the full screen           */
  441.  
  442. /*
  443.  * these are valid after apl_vopen()
  444.  */
  445.  
  446. extern short  gl_vwout[57];    /* work_out from v_opnvwk()                  */
  447. extern short  gl_vxout[57];    /* work_out from vq_extnd(,1,)               */
  448.  
  449. /*****************************************************************************
  450.  * prototypes.
  451.  ****************************************************************************/
  452.  
  453. extern void     apl_cleanup         __PROTO((short cleanup_type));
  454. extern void     apl_mmvectors       __PROTO((void *allocfunc, void *freefunc));
  455. extern void     apl_vclose          __PROTO((short vhandle));
  456. extern short    apl_vopen           __PROTO((void));
  457. extern short    apl_vshared         __PROTO((void));
  458. extern void     apl_xexit           __PROTO((void));
  459. extern short    apl_xinit           __PROTO((void));
  460. extern void     evn_wbutton         __PROTO((short up_or_down));
  461. extern void     frm_confine         __PROTO((OBJECT *tree, GRECT *boundrect));
  462. extern long     frm_defaults        __PROTO((long options));
  463. extern void     frm_desktop         __PROTO((long options, OBJECT *tree));
  464. extern short    frm_dialog          __PROTO((long options, OBJECT *tree, short editobj));
  465. extern short    frm_dsdialog        __PROTO((long options, char **btnarray, char **strarray));
  466. extern short    frm_dsmenu          __PROTO((long options, char *title, char **itemarray));
  467. extern short    frm_eflag           __PROTO((OBJECT *tree, short object, char *fmt, ...));
  468. extern void     frm_enableblit      __PROTO((void));
  469. extern short    frm_error           __PROTO((short errcode, char *buttons, char *fmt, ...));
  470. extern short    frm_menu            __PROTO((long options, OBJECT *tree, short select_state));
  471. extern short    frm_mkmoveable      __PROTO((OBJECT *tree, short mover_object));
  472. extern short    frm_nldialog        __PROTO((long options, char *buttons, char *lines));
  473. extern short    frm_nlmenu          __PROTO((long options, char *title, char *items));
  474. extern short    frm_printf          __PROTO((long options, char *buttons, char *fmt, ...));
  475. extern short    frm_progress        __PROTO((long options, short increments, char *abortbutton, char *fmt, ...));
  476. extern short    frm_qchoice         __PROTO((char *buttons, char *fmt, ...));
  477. extern short    frm_qerror          __PROTO((short error, char *fmt, ...));
  478. extern short    frm_qfatal          __PROTO((short error, char *fmt, ...));
  479. extern short    frm_qmenu           __PROTO((char *title, char *selections));
  480. extern void     frm_qtext           __PROTO((char *fmt, ...));
  481. extern short    frm_question        __PROTO((char *fmt, ...));
  482. extern void     frm_sizes           __PROTO((OBJECT *tree, GRECT *outrect));
  483. extern short    frm_verror          __PROTO((short errcode, char *buttons, char *fmt, va_list args));
  484. extern short    frm_vprintf         __PROTO((long options, char *buttons, char *fmt, va_list args));
  485. extern short    frm_vprogress       __PROTO((long options, short increments, char *abortbutton, char *fmt, va_list args));
  486. extern short    fsl_dialog          __PROTO((short options, char *opath, char *ipath, char *forcewild, char *prompt));
  487. extern long     grf_blit            __PROTO((short options, void *buffer, void *rect_or_tree));
  488. extern void *   grf_memblit         __PROTO((short options, void *buffer, void *rect_or_tree));
  489. extern short    grf_mouse           __PROTO((short newshape, void *usershape));
  490. extern short    grf_udslidebox      __PROTO((OBJECT *ptree, short obj, short v_or_h, GUDSLIDE_FUNC *ufunc, void *udata));
  491. extern short    mnu_bar             __PROTO((OBJECT *tree, short install_or_remove, long reserved));
  492. extern void     mnu_disable         __PROTO((void));
  493. extern void     mnu_enable          __PROTO((void));
  494. extern void     mnu_erase           __PROTO((void));
  495. extern void     mnu_tbar            __PROTO((char *title_string));
  496. extern short    obj_bmbuttons       __PROTO((OBJECT *tree, short parent, short select_state, short bitmap));
  497. extern short    obj_clcalc          __PROTO((OBJECT *tree, short object, GRECT *grectout, VRECT *vrectout));
  498. extern short    obj_dxfind          __PROTO((OBJECT *tree));
  499. extern void     obj_flchange        __PROTO((OBJECT *tree, short object, short newstate, int redraw, ...));
  500. extern char *   obj_gstring         __PROTO((OBJECT *tree, short object));
  501. extern short    obj_gtype           __PROTO((OBJECT *tree, short object));
  502. extern long     obj_gvalue          __PROTO((OBJECT *tree, short object));
  503. extern void     obj_offxywh         __PROTO((OBJECT *tree, short object, GRECT *outrect));
  504. extern short    obj_parent          __PROTO((OBJECT *tree, short object));
  505. extern char **  obj_ppstring        __PROTO((OBJECT *tree));
  506. extern short    obj_rbfind          __PROTO((OBJECT *tree, short parent, short select_state));
  507. extern short    obj_rbselect        __PROTO((OBJECT *tree, short object, short select_state));
  508. extern void     obj_stchange        __PROTO((OBJECT *tree, short object, short new_state, int redraw, ...));
  509. extern void     obj_sstring         __PROTO((OBJECT *tree, short object, char *newstring));
  510. extern void     obj_svalue          __PROTO((OBJECT *tree, short object, long newvalue));
  511. extern short    obj_xtfind          __PROTO((OBJECT *tree, short parent, char xtype));
  512. extern void     obj_xywh            __PROTO((OBJECT *tree, short object, GRECT *outrect));
  513. extern void     rc_confine          __PROTO((GRECT *boundrect, GRECT *therect));
  514. extern GRECT *  rc_gadjust          __PROTO((GRECT *dest, short hadjust, short vadjust));
  515. extern VRECT *  rc_gtov             __PROTO((GRECT *source, VRECT *dest));
  516. extern short    rc_ptinrect         __PROTO((GRECT *therect, short x, short y));
  517. extern GRECT *  rc_scale            __PROTO((GRECT *source, GRECT *dest, short percentage));
  518. extern VRECT *  rc_vadjust          __PROTO((VRECT *dest, short hadjust, short vadjust));
  519. extern GRECT *  rc_vtog             __PROTO((VRECT *source, GRECT *dest));
  520. extern short    rsc_cubuttons       __PROTO((OBJECT *tree));
  521. extern void     rsc_gstrings        __PROTO((OBJECT *tree, int object, char **ppstring, ...));
  522. extern void     rsc_gtrees          __PROTO((int object, OBJECT **pptree, ...));
  523. extern short    rsc_rrbuttons       __PROTO((OBJECT *tree));
  524. extern void     rsc_sstrings        __PROTO((OBJECT *tree, int object, char *string, ...));
  525. extern void     rsc_sxtypes         __PROTO((OBJECT *tree, int object, int xtype, ...));
  526. extern void     rsc_treefix         __PROTO((OBJECT *tree));
  527. extern void     wc_scroll_calc      __PROTO((short curline, short datalines, short windowlines, short *slsize, short *slpos));
  528. extern short    wnd_top             __PROTO((void));
  529. extern short    wnd_update          __PROTO((short semaphore));
  530. extern void     xob_nslide_change   __PROTO((OBJECT *tree, short object, long newmin, long newmax));
  531. extern short    xob_nslide_create   __PROTO((OBJECT *tree, short object, long min, long max));
  532. extern long     xob_nslide_get      __PROTO((OBJECT *tree, short object));
  533. extern void     xob_nslide_set      __PROTO((OBJECT *tree, short object, long newvalue));
  534. extern short    xob_thermo_create   __PROTO((OBJECT *tree, short object, short increments));
  535. extern short    xob_thermo_update   __PROTO((OBJECT *tree, short object, short newpos, GRECT *cliprect));
  536. extern short    xob_tscroll_create  __PROTO((OBJECT *tree, short object, short statusobj));
  537. extern void     xob_tscroll_set     __PROTO((OBJECT *tree, short object, char **datalist, short numitems, short curitem, short topitem));
  538. extern short    xob_tscroll_get     __PROTO((OBJECT *tree, short object, char **curstring, short *curitem, short *topitem));
  539. extern void     xob_transform       __PROTO((OBJECT *tree, short object, XUSERBLK *xub, XUB_DRAWFUNC *pdraw, XUB_TOUCHFUNC *ptouch, long xub_size));
  540. extern void     xob_change          __PROTO((OBJECT *tree, short object, GRECT *cliprect, short newstate, short redraw));
  541. extern void     xob_draw            __PROTO((OBJECT *tree, short object, short depth, GRECT *cliprect));
  542. extern void     xob_offset          __PROTO((OBJECT *tree, short object, short *px, short *py));
  543.  
  544. extern short    evnx_multi          __PROTO((XMULTI *xm));
  545. extern short    evnx_timer          __PROTO((unsigned long milliseconds));
  546. extern short    frmx_center         __PROTO((OBJECT *tree, GRECT *outrect));
  547. extern short    frmx_dial           __PROTO((short flag, GRECT *little, GRECT *big));
  548. extern short    grfx_dragbox        __PROTO((GRECT *start, GRECT *boundary, GRECT *end));
  549. extern short    winx_calc           __PROTO((short type, short kind, GRECT inrect, GRECT *outrect));
  550. extern short    winx_get            __PROTO((short whandle, short field, GRECT *outrect));
  551.  
  552. /*****************************************************************************
  553.  * automatically use extended binding routines.
  554.  *   if you undo these macros, all the builtin utilities will break!
  555.  *   the normal low-level bindings will still work, though.
  556.  ****************************************************************************/
  557.  
  558. #if defined(LATTICE)
  559.   #undef appl_init
  560.   #undef appl_exit
  561.   #undef wind_update
  562. #endif
  563.  
  564. #define appl_init   apl_xinit   /* extended init fills in new gl_ vars    */
  565. #define appl_exit   apl_xexit   /* extended exit closes shared vdi, etc   */
  566. #define wind_update wnd_update  /* use stack-like wind_update routine     */
  567. #define graf_mouse  grf_mouse   /* use save/restore mouse shape system    */
  568.  
  569. #define menu_bar(a,b)           mnu_bar((a),(b),0L)
  570. #define frm_sizes(tree, rect)   obj_clcalc((tree), ROOT, (rect), NULL)
  571.  
  572. /*****************************************************************************
  573.  * Name compatibility stuff
  574.  ****************************************************************************/
  575.  
  576.  
  577. #define obj_make_tscroll    xob_tscroll_create
  578. #define obj_set_tscroll     xob_tscroll_set
  579. #define obj_get_tscroll     xob_tscroll_get
  580. #define obj_mkthermo        xob_thermo_create
  581. #define obj_udthermo        xob_thermo_udpate
  582. #define obj_mxuserdef       xob_transform
  583.  
  584. #define frm_dsdial(str,btn, options) frm_dsdialog((options)|FRM_DSL1TITLE,(btn),(str))
  585.  
  586. #ifdef LATTICE          /* Lattice C bug workaround: now that all our   */
  587.   #undef __saveds       /* prototypes have been processed, let __saveds */
  588. #endif                  /* have its usual meaning again.                */
  589.  
  590. #endif /* NO_GEMFAST_HLL */
  591.  
  592. #ifdef __cplusplus
  593.   }
  594. #endif
  595.  
  596. #endif /* GEMFAST_H */
  597.  
  598.  
  599.